* Wealth index calculation. Guillermo Rojas, 02/08/2017. South Africa DHS 2016. cd 'C:\SA71\Wealth'. include file='C:\SA71\Wealth\Wealth_assets.sps'. execute. set tvars=both. * Comments made by Shea as part of revision * 1. Combine chemical toilet with other toilet. * 2. Combine cooking fuel: electricity from generator with electricity from other source. Solar energy with other, agricultural crop with animal dung. * 3. Combine heating fuel: electricity from generator with electricity from other source, solar energy with other, straw/shrubs/grass, agricultural crop with animal dung. * 4. Combine type of roof material: thatching/grass, mud/sod and wattle and daub. * 5. Regroup chickens and other poultry into 1-9, 10-29, 30+. * 6. Pattern of electricity is very strange. Looks like no and yes have been reversed. * Macro definitions to perform some recoding automatically. * Note: Do not use an asterisk in front of a macro name to try to comment it out - it will run any way because of the way the macros are expanded. * Delete the line instead or change the spelling of the macro in the comment. * Do not use the names of macros in comments - they will also be expanded too, and likely will fail. *{Create binary variables based on condition and give label }. define dichotomize( !positional !enclose('(',')') / !positional !tokens(1) / !positional !tokens(1) ) compute !2=0. if (!1) !2=1. variable labels !2 !3. value labels !2 0 'No' 1 'Yes'. formats !2 (f1.0). !enddefine. *(Separate shared toilets from non-shared toilets). define shared_fac( !positional !tokens(1) / !positional !tokens(1) / !positional !tokens(1) ). compute !2 = 0. do if (QH110=1). + if (!1=1) !2 = 1. + compute !1 = 0. end if. variable labels !2 !3. value labels !2 0 'No' 1 'Yes'. formats !2 (f1.0). !enddefine. *{Reset missing values to 'does not have', change 2 code to 0}. define no2zero( !positional !tokens(1) ) if (missing(!1) | !1<>1) !1=0. value labels !1 0 'No' 1 'Yes'. !enddefine. *{Construct Variables}. * Source of drinking water. dichotomize (QH101=11) QH101_11 "Source of drinking water: Piped into dwelling/house". dichotomize (QH101=12) QH101_12 "Source of drinking water: Piped to yard/plot". dichotomize (QH101=13) QH101_13 "Source of drinking water: Piped to neighbour". dichotomize (QH101=14) QH101_14 "Source of drinking water: Public/communal tap". dichotomize (QH101=21) QH101_21 "Source of drinking water: Borehole". dichotomize (QH101=31) QH101_31 "Source of drinking water: Protected well". dichotomize (QH101=32) QH101_32 "Source of drinking water: Unprotected well". dichotomize (QH101=41) QH101_41 "Source of drinking water: Protected spring". dichotomize (QH101=42) QH101_42 "Source of drinking water: Unprotected spring". dichotomize (QH101=51) QH101_51 "Source of drinking water: Rainwater". dichotomize (QH101=61) QH101_61 "Source of drinking water: Water-carrier/tanker truck". dichotomize (QH101=71) QH101_71 "Source of drinking water: Cart with small tank/water vendor". dichotomize (QH101=81) QH101_81 "Source of drinking water: Surface water (river/dam/lake/pond/stream/canal/irrigation channel)". dichotomize (QH101=91) QH101_91 "Source of drinking water: Bottled water". dichotomize (QH101=96) QH101_96 "Source of drinking water: Other". * Type of toilet facility. dichotomize (QH109=11) QH109_11 "Type of toilet facility: Flush to piped sewer system". dichotomize (QH109=12) QH109_12 "Type of toilet facility: Flush to septic tank". dichotomize (QH109=13) QH109_13 "Type of toilet facility: Flush to pit latrine". dichotomize (QH109=14) QH109_14 "Type of toilet facility: Flush to somewhere else". dichotomize (QH109=15) QH109_15 "Type of toilet facility: Flush, don't know where". dichotomize (QH109=21) QH109_21 "Type of toilet facility: Ventilated improved pit latrine". dichotomize (QH109=22) QH109_22 "Type of toilet facility: Pit latrine with ventilation pipe but no gauze mesh/netting". dichotomize (QH109=23) QH109_23 "Type of toilet facility: Pit latrine without ventilation pipe". dichotomize (QH109=31) QH109_31 "Type of toilet facility: Composting toilet, ecological sanitation system". dichotomize (QH109=41) QH109_41 "Type of toilet facility: Chemical toilet". dichotomize (QH109=51) QH109_51 "Type of toilet facility: Bucket toilet". dichotomize (QH109=61) QH109_61 "Type of toilet facility: No facility/bush/field". dichotomize (QH109=96) QH109_96 "Type of toilet facility: Other". if (QH109_41=1) QH109_96=1. shared_fac QH109_11 QH109_11_sh "Type of toilet facility: Flush to piped sewer system - shared". shared_fac QH109_12 QH109_12_sh "Type of toilet facility: Flush to septic tank - shared". shared_fac QH109_13 QH109_13_sh "Type of toilet facility: Flush to pit latrine - shared". shared_fac QH109_14 QH109_14_sh "Type of toilet facility: Flush to somewhere else - shared". shared_fac QH109_15 QH109_15_sh "Type of toilet facility: Flush, don't know where - shared". shared_fac QH109_21 QH109_21_sh "Type of toilet facility: Ventilated improved pit latrine - shared". shared_fac QH109_22 QH109_22_sh "Type of toilet facility: Pit latrine with ventilation pipe but no gauze mesh/netting - shared". shared_fac QH109_23 QH109_23_sh "Type of toilet facility: Pit latrine without ventilation pipe - shared". shared_fac QH109_31 QH109_31_sh "Type of toilet facility: Composting toilet, ecological sanitation system - shared". shared_fac QH109_41 QH109_41_sh "Type of toilet facility: Chemical toilet - shared". shared_fac QH109_51 QH109_51_sh "Type of toilet facility: Bucket toilet - shared". shared_fac QH109_96 QH109_96_sh "Type of toilet facility: Other - shared". if (QH109_41_sh=1) QH109_96_sh=1. * Type of cooking fuel. dichotomize (QH113=1) QH113_1 "Type of cooking fuel: Electricity from mains". dichotomize (QH113=2) QH113_2 "Type of cooking fuel: Electricity from generator". dichotomize (QH113=3) QH113_3 "Type of cooking fuel: Electricity from other source". dichotomize (QH113=4) QH113_4 "Type of cooking fuel: Solar energy". dichotomize (QH113=5) QH113_5 "Type of cooking fuel: Gas". dichotomize (QH113=6) QH113_6 "Type of cooking fuel: Paraffin". dichotomize (QH113=7) QH113_7 "Type of cooking fuel: Coal". dichotomize (QH113=8) QH113_8 "Type of cooking fuel: Wood". dichotomize (QH113=9) QH113_9 "Type of cooking fuel: Straw/shrubs/grass". dichotomize (QH113=10) QH113_10 "Type of cooking fuel: Agricultural crop". dichotomize (QH113=11) QH113_11 "Type of cooking fuel: Animal dung". dichotomize (QH113=95) QH113_95 "Type of cooking fuel: No food cooked in household". dichotomize (QH113=96) QH113_96 "Type of cooking fuel: Other". if (QH113_2=1) QH113_3=1. if (QH113_4=1) QH113_96=1. if (QH113_10=1) QH113_11=1. * Type of fuel used for heating. dichotomize (QH116A=1) QH116A_1 "Type of fuel used for heating: Electricity from mains". dichotomize (QH116A=2) QH116A_2 "Type of fuel used for heating: Electricity from generator". dichotomize (QH116A=3) QH116A_3 "Type of fuel used for heating: Electricity from other source". dichotomize (QH116A=4) QH116A_4 "Type of fuel used for heating: Solar energy". dichotomize (QH116A=5) QH116A_5 "Type of fuel used for heating: Gas". dichotomize (QH116A=6) QH116A_6 "Type of fuel used for heating: Paraffin". dichotomize (QH116A=7) QH116A_7 "Type of fuel used for heating: Coal". dichotomize (QH116A=8) QH116A_8 "Type of fuel used for heating: Wood". dichotomize (QH116A=9) QH116A_9 "Type of fuel used for heating: Straw/shrubs/grass". dichotomize (QH116A=10) QH116A_10 "Type of fuel used for heating: Agricultural crop". dichotomize (QH116A=11) QH116A_11 "Type of fuel used for heating: Animal dung". dichotomize (QH116A=95) QH116A_95 "Type of fuel used for heating: No heating/warming in household". dichotomize (QH116A=96) QH116A_96 "Type of fuel used for heating: Other". if (QH116A_2=1) QH116A_3=1. if (QH116A_4=1) QH116A_96=1. if (QH116A_9=1 | QH116A_10=1) QH116A_11=1. * Cattle. if (missing(QH118A) | QH117 <> 1) QH118A=0. missing values QH118A (99). compute QH118A_0 = (QH118A = 0). compute QH118A_1 = (QH118A >= 1 & QH118A <= 4). compute QH118A_2 = (QH118A >= 5 & QH118A <= 9). compute QH118A_3 = (QH118A >= 10 & QH118A <= 98). variable labels QH118A_0 'Cattle: None' /QH118A_1 'Cattle: 1-4' /QH118A_2 'Cattle: 5-9' /QH118A_3 'Cattle: 10+'. * Horses/donkeys/mules. if (missing(QH118B) | QH117 <> 1) QH118B=0. missing values QH118B (99). compute QH118B_0 = (QH118B = 0). compute QH118B_1 = (QH118B >= 1 & QH118B <= 4). compute QH118B_2 = (QH118B >= 5 & QH118B <= 9). compute QH118B_3 = (QH118B >= 10 & QH118B <= 98). variable labels QH118B_0 'Horses/donkeys/mules: None' /QH118B_1 'Horses/donkeys/mules: 1-4' /QH118B_2 'Horses/donkeys/mules: 5-9' /QH118B_3 'Horses/donkeys/mules: 10+'. * Goats. if (missing(QH118C) | QH117 <> 1) QH118C=0. missing values QH118C (99). compute QH118C_0 = (QH118C = 0). compute QH118C_1 = (QH118C >= 1 & QH118C <= 4). compute QH118C_2 = (QH118C >= 5 & QH118C <= 9). compute QH118C_3 = (QH118C >= 10 & QH118C <= 98). variable labels QH118C_0 'Goats: None' /QH118C_1 'Goats: 1-4' /QH118C_2 'Goats: 5-9' /QH118C_3 'Goats: 10+'. * Sheep. if (missing(QH118D) | QH117 <> 1) QH118D=0. missing values QH118D (99). compute QH118D_0 = (QH118D = 0). compute QH118D_1 = (QH118D >= 1 & QH118D <= 4). compute QH118D_2 = (QH118D >= 5 & QH118D <= 9). compute QH118D_3 = (QH118D >= 10 & QH118D <= 98). variable labels QH118D_0 'Sheep: None' /QH118D_1 'Sheep: 1-4' /QH118D_2 'Sheep: 5-9' /QH118D_3 'Sheep: 10+'. * Pigs. if (missing(QH118E) | QH117 <> 1) QH118E=0. missing values QH118E (99). compute QH118E_0 = (QH118E = 0). compute QH118E_1 = (QH118E >= 1 & QH118E <= 4). compute QH118E_2 = (QH118E >= 5 & QH118E <= 9). compute QH118E_3 = (QH118E >= 10 & QH118E <= 98). variable labels QH118E_0 'Pigs: None' /QH118E_1 'Pigs: 1-4' /QH118E_2 'Pigs: 5-9' /QH118E_3 'Pigs: 10+'. * Chickens or other poultry. if (missing(QH118F) | QH117 <> 1) QH118F=0. missing values QH118F (99). compute QH118F_0 = (QH118F = 0). compute QH118F_1 = (QH118F >= 1 & QH118F <= 9). compute QH118F_2 = (QH118F >= 10 & QH118F <= 29). compute QH118F_3 = (QH118F >= 30 & QH118F <= 98). variable labels QH118F_0 'Chickens or other poultry: None' /QH118F_1 'Chickens or other poultry: 1-9' /QH118F_2 'Chickens or other poultry: 10-29' /QH118F_3 'Chickens or other poultry: 30+'. * Electricity. no2zero QH121A. if (QH113 = 1 | QH116A = 1 ) QH121A=1. * Radio. no2zero QH121B. * Television. no2zero QH121C. * Telephone (non-mobile). no2zero QH121D. * Computer. no2zero QH121E. * Refrigerator. no2zero QH121F. * Vacuum cleaner or floor polisher. no2zero QH121G. * Microwave oven. no2zero QH121H. * Electric/gas stove. no2zero QH121I. * Washing machine. no2zero QH121J. * Watch. no2zero QH122A. * Mobile telephone. no2zero QH122B. * Bicycle. no2zero QH122C. * Motorcycle or scooter. no2zero QH122D. * Animal-drawn cart. no2zero QH122E. * Car or Truck. no2zero QH122F. * Boat with a motor. no2zero QH122G. * How is refuse collected or removed. dichotomize (QH124A=1) QH124A_1 "How is refuse collected or removed: Removed by local authority/private company at least once a week". dichotomize (QH124A=2) QH124A_2 "How is refuse collected or removed: Removed by local authority/private company less often than once a week". dichotomize (QH124A=3) QH124A_3 "How is refuse collected or removed: Removed by community members contracted by municipality at least once a week". dichotomize (QH124A=4) QH124A_4 "How is refuse collected or removed: Removed by community members contracted by municipality less than once a week". dichotomize (QH124A=5) QH124A_5 "How is refuse collected or removed: Removed by community members at least once a week". dichotomize (QH124A=6) QH124A_6 "How is refuse collected or removed: Removed by community members less than once a week". dichotomize (QH124A=7) QH124A_7 "How is refuse collected or removed: Communal refuse dump". dichotomize (QH124A=8) QH124A_8 "How is refuse collected or removed: Communal container/central collection point". dichotomize (QH124A=9) QH124A_9 "How is refuse collected or removed: Own refuse dump". dichotomize (QH124A=10) QH124A_10 "How is refuse collected or removed: Own refuse burned". dichotomize (QH124A=11) QH124A_11 "How is refuse collected or removed: No rubbish disposal/dump or leave anywhere". dichotomize (QH124A=96) QH124A_96 "How is refuse collected or removed: Other". * Type of dwelling. dichotomize (QH141A=1) QH141A_1 "Type of dwelling: Dwelling/house or brick/concrete block structure on a separate stand/yard/farm". dichotomize (QH141A=2) QH141A_2 "Type of dwelling: Traditional dwelling/hut structure made of traditional materials". dichotomize (QH141A=3) QH141A_3 "Type of dwelling: Flat or apartment in block of flats". dichotomize (QH141A=4) QH141A_4 "Type of dwelling: Cluster house in complex". dichotomize (QH141A=5) QH141A_5 "Type of dwelling: Town house/semi-detached house in complex". dichotomize (QH141A=6) QH141A_6 "Type of dwelling: Semi-detached house". dichotomize (QH141A=7) QH141A_7 "Type of dwelling: Dwelling/house/flat/room in backyard". dichotomize (QH141A=8) QH141A_8 "Type of dwelling: Informal dwelling/shack in backyard". dichotomize (QH141A=9) QH141A_9 "Type of dwelling: Informal dwelling/shack not in backyard (e.g. in informal/squatter settlement or". dichotomize (QH141A=10) QH141A_10 "Type of dwelling: Room/flatlet on property or larger dwelling/servant's quarters/granny flat". dichotomize (QH141A=11) QH141A_11 "Type of dwelling: Caravan or tent". dichotomize (QH141A=96) QH141A_96 "Type of dwelling: Other". * Main floor material. dichotomize (QH142=11) QH142_11 "Main floor material: Earth/sand". dichotomize (QH142=12) QH142_12 "Main floor material: Dung". dichotomize (QH142=21) QH142_21 "Main floor material: Wood planks". dichotomize (QH142=31) QH142_31 "Main floor material: Laminated or polished wood". dichotomize (QH142=32) QH142_32 "Main floor material: Vinyl or asphalt strips". dichotomize (QH142=33) QH142_33 "Main floor material: Ceramic tiles". dichotomize (QH142=34) QH142_34 "Main floor material: Cement". dichotomize (QH142=35) QH142_35 "Main floor material: Carpet". dichotomize (QH142=96) QH142_96 "Main floor material: Other". * Main roof material. dichotomize (QH143=11) QH143_11 "Main roof material: No roof". dichotomize (QH143=12) QH143_12 "Main roof material: Thatching/grass". dichotomize (QH143=13) QH143_13 "Main roof material: Mud/sod". dichotomize (QH143=21) QH143_21 "Main roof material: Plastic". dichotomize (QH143=22) QH143_22 "Main roof material: Wattle and daub". dichotomize (QH143=23) QH143_23 "Main roof material: Mud with cement mix". dichotomize (QH143=24) QH143_24 "Main roof material: Bricks". dichotomize (QH143=25) QH143_25 "Main roof material: Wood planks". dichotomize (QH143=26) QH143_26 "Main roof material: Cardboard". dichotomize (QH143=31) QH143_31 "Main roof material: Corrugated iron/zinc". dichotomize (QH143=32) QH143_32 "Main roof material: Wood". dichotomize (QH143=33) QH143_33 "Main roof material: Asbestos". dichotomize (QH143=34) QH143_34 "Main roof material: Tiles". dichotomize (QH143=35) QH143_35 "Main roof material: Cement". dichotomize (QH143=96) QH143_96 "Main roof material: Other". if (QH143_12=1 | QH143_13=1 ) QH143_22=1. * Main wall material. dichotomize (QH144=11) QH144_11 "Main wall material: No walls". dichotomize (QH144=12) QH144_12 "Main wall material: Dirt/mud". dichotomize (QH144=21) QH144_21 "Main wall material: Plastic". dichotomize (QH144=22) QH144_22 "Main wall material: Wattle and daub". dichotomize (QH144=23) QH144_23 "Main wall material: Stone with mud". dichotomize (QH144=24) QH144_24 "Main wall material: Mud with cement mix". dichotomize (QH144=25) QH144_25 "Main wall material: Cardboard". dichotomize (QH144=26) QH144_26 "Main wall material: Reused wood". dichotomize (QH144=31) QH144_31 "Main wall material: Cement". dichotomize (QH144=32) QH144_32 "Main wall material: Stone with lime/cement". dichotomize (QH144=33) QH144_33 "Main wall material: Bricks". dichotomize (QH144=34) QH144_34 "Main wall material: Cement block/concrete". dichotomize (QH144=36) QH144_36 "Main wall material: Wood planks". dichotomize (QH144=37) QH144_37 "Main wall material: Corrugated iron/zinc". dichotomize (QH144=96) QH144_96 "Main wall material: Other". *{Members per sleeping room}. if (hhusual=0) hhusual=hhslept. if (QH116>0) memsleep=trunc(hhusual/QH116). if (QH116=0) memsleep=hhusual. if (missing(QH116) or QH116>=99 or memsleep>=98) memsleep=99. variable labels memsleep 'Number of members per sleeping room'. value labels memsleep 0 'Less than 1 per room'. formats memsleep (f2.0). missing values memsleep (99). * Compute urban and rural variables coded (1/0) for filters later. compute urban=(QHTYPE = 1). compute rural=(QHTYPE = 2). variable labels urban 'Urban' / rural 'Rural'. value labels urban 1 'Urban' / rural 1 'Rural'. formats urban rural (f1.0). execute. * Check on indicator variable creation. frequencies variables=QHTYPE to domestic. * Toilet facility by shared/not shared. crosstabs /tables=QH109 by QH110. frequencies variables= QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH109_96_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_9 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 DOMESTIC HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 . * Turn off weights before all factor analysis. weight off. * Name the dataset window for the HH data for use later. dataset name assets. save outfile='assets.sav'. *** Test Factor Analysis. filter off. execute. factor /variables QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /missing meansub /analysis QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /method=correlation. *** Common Factor analysis ***. ** Removed area-specific variables **. ** Agricultural animal variables excluded ** Land area excluded ** Any others ?. *** Common Factor Analysis. filter off. execute. factor /variables QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep /missing meansub /analysis QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL com) /method=correlation. *** Urban Factor Analysis. filter off. filter by urban. execute. factor /variables QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /missing meansub /analysis QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL urb) /method=correlation. *** Rural Factor Analysis. filter off. filter by rural. execute. factor /variables QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_21 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /missing meansub /analysis QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_21 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL rur) /method=correlation. * Label the created score variables. rename variables (com1 urb1 rur1=comscore urbscore rurscore). variable labels comscore 'Common wealth score' /urbscore 'Urban wealth score' /rurscore 'Rural wealth score'. * Add a variable used for linking later. filter off. string rowtype_ (A8). compute rowtype_ = 'EST'. * Calculate regressions. ** Area=urban. filter off. filter by urban. execute. * Declare a dataset to be written to in the regression. dataset declare urbancorv. * Run regression of comscore with urbscore. regression /missing listwise /statistics coeff outs R anova /criteria=pin(.05) pout(.10) /noorigin /dependent comscore /method=enter urbscore /outfile=corv(urbancorv). * Activate file of output from regression. dataset activate urbancorv. * Drop all rows of output except the coefficients. select if (rowtype_ = 'EST'). execute. * Delete unnecessary variables before merging. delete variables DEPVAR_ VARNAME_. * Rename variables containing the constant and the coefficient. rename variables CONST_=urbconst urbscore=urbcoeff. * Re-activate the main household data. dataset activate assets. * merge the coefficients. match files /file = * /table = urbancorv /by ROWTYPE_. execute. * Calculate regressions. ** Area=rural. filter off. filter by rural. execute. * Declare a dataset to be written to in the regression. dataset declare ruralcorv. * Run regression of comscore with rurscore. regression /missing listwise /statistics coeff outs R anova /criteria=pin(.05) pout(.10) /noorigin /dependent comscore /method=enter rurscore /outfile=corv(ruralcorv). * Activate file of output from regression. dataset activate ruralcorv. * Drop all rows of output except the coefficients. select if (rowtype_ = 'EST'). execute. * Delete unnecessary variables before merging. delete variables DEPVAR_ VARNAME_. * Rename variables containing the constant and the coefficient. rename variables CONST_=rurconst rurscore=rurcoeff. * Re-activate the main household data. dataset activate assets. * merge the coefficients. match files /file = * /table = ruralcorv /by ROWTYPE_. execute. dataset close urbancorv. dataset close ruralcorv. dataset activate assets. filter off. *** Calculate combined wealth score from Urban and Rural Scores. * Use coefficients from urban and rural regressions above. compute combscor=0. print formats combscor (f11.5). write formats combscor (f11.5). ** Urban. if (urban = 1) combscor=urbconst+urbcoeff*urbscore. ** Rural. if (rural = 1) combscor=rurconst+rurcoeff*rurscore. variable labels combscor 'Combined national wealth score'. execute. compute hhwt = QHWEIGHT/1000000. variable labels hhwt 'HH weights'. weight by hhwt. filter off. execute. frequencies variables=combscor comscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. filter by urban. execute. frequencies variables=combscor urbscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. filter by rural. execute. frequencies variables=combscor rurscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. execute. *Calculate quintiles and scores for data file. compute hhmemwt=QHWEIGHT*hhusual/1000000. weight by hhmemwt. variable labels hhmemwt 'HH members weighting for index'. filter off. filter by urban. execute. rank variables=urbscore (A) /rank /ntiles (5) /print=yes /ties=mean. filter off. filter by rural. execute. rank variables=rurscore (A) /rank /ntiles (5) /print=yes /ties=mean. filter off. execute. rank variables=combscor (A) /rank /ntiles (5) /print=yes /ties=mean. variable labels ncombsco 'Combined wealth index' /nurbscor 'Urban wealth index' /nrurscor 'Rural wealth index'. value labels ncombsco nurbscor nrurscor 1 'Lowest' 2 'Second' 3 'Middle' 4 'Fourth' 5 'Highest'. *** Check on quintiles. frequencies variables=ncombsco nurbscor nrurscor. weight by hhwt. ctables /table ( QH101_11+QH101_12+QH101_13+QH101_14+QH101_21+QH101_31+QH101_32+QH101_41+QH101_42+QH101_51+QH101_61+QH101_71+QH101_81+QH101_91+QH101_96+ QH109_11+QH109_12+QH109_13+QH109_14+QH109_15+QH109_21+QH109_22+QH109_23+QH109_31+QH109_51+QH109_61+QH109_96+ QH109_11_sh+QH109_12_sh+QH109_13_sh+QH109_14_sh+QH109_15_sh+QH109_21_sh+QH109_22_sh+QH109_23_sh+QH109_31_sh+QH109_51_sh+ QH113_1+QH113_3+QH113_5+QH113_6+QH113_7+QH113_8+QH113_9+QH113_11+QH113_95+QH113_96+ QH116A_1+QH116A_3+QH116A_5+QH116A_6+QH116A_7+QH116A_8+QH116A_11+QH116A_95+QH116A_96+ QH121A+QH121B+QH121C+QH121D+QH121E+QH121F+QH121G+QH121H+QH121I+QH121J+QH122A+QH122B+QH122C+QH122D+QH122E+QH122F+QH122G+ QH124A_1+QH124A_2+QH124A_3+QH124A_4+QH124A_5+QH124A_6+QH124A_7+QH124A_8+QH124A_9+QH124A_10+QH124A_11+QH124A_96+ QH141A_1+QH141A_2+QH141A_3+QH141A_4+QH141A_5+QH141A_6+QH141A_7+QH141A_8+QH141A_9+QH141A_10+QH141A_11+QH141A_96+ QH142_11+QH142_12+QH142_21+QH142_31+QH142_32+QH142_33+QH142_34+QH142_35+QH142_96+ QH143_11+QH143_21+QH143_22+QH143_23+QH143_24+QH143_25+QH143_26+QH143_31+QH143_32+QH143_33+QH143_34+QH143_35+QH143_96+ QH144_11+QH144_12+QH144_21+QH144_22+QH144_23+QH144_24+QH144_25+QH144_26+QH144_31+QH144_32+QH144_33+QH144_34+QH144_36+QH144_37+QH144_96+ HOUSE+memsleep+ QH118A_1+QH118A_2+QH118A_3+QH118B_1+QH118B_2+QH118B_3+ QH118C_1+QH118C_2+QH118C_3+QH118D_1+QH118D_2+QH118D_3+ QH118E_1+QH118E_2+QH118E_3+QH118F_1+QH118F_2+QH118F_3 )[S][Mean F8.3] by (ncombsco+nurbscor+nrurscor)[C] /slabels visible=no. * Alternative instead of ctables. *means tables= QH101_11 QH101_12 QH101_13 QH101_14 QH101_21 QH101_31 QH101_32 QH101_41 QH101_42 QH101_51 QH101_61 QH101_71 QH101_81 QH101_91 QH101_96 QH109_11 QH109_12 QH109_13 QH109_14 QH109_15 QH109_21 QH109_22 QH109_23 QH109_31 QH109_51 QH109_61 QH109_96 QH109_11_sh QH109_12_sh QH109_13_sh QH109_14_sh QH109_15_sh QH109_21_sh QH109_22_sh QH109_23_sh QH109_31_sh QH109_51_sh QH113_1 QH113_3 QH113_5 QH113_6 QH113_7 QH113_8 QH113_11 QH113_95 QH113_96 QH116A_1 QH116A_3 QH116A_5 QH116A_6 QH116A_7 QH116A_8 QH116A_11 QH116A_95 QH116A_96 QH121A QH121B QH121C QH121D QH121E QH121F QH121G QH121H QH121I QH121J QH122A QH122B QH122C QH122D QH122E QH122F QH122G QH124A_1 QH124A_2 QH124A_3 QH124A_4 QH124A_5 QH124A_6 QH124A_7 QH124A_8 QH124A_9 QH124A_10 QH124A_11 QH124A_96 QH141A_1 QH141A_2 QH141A_3 QH141A_4 QH141A_5 QH141A_6 QH141A_7 QH141A_8 QH141A_9 QH141A_10 QH141A_11 QH141A_96 QH142_11 QH142_12 QH142_21 QH142_31 QH142_32 QH142_33 QH142_34 QH142_35 QH142_96 QH143_11 QH143_21 QH143_22 QH143_23 QH143_24 QH143_25 QH143_26 QH143_31 QH143_32 QH143_33 QH143_34 QH143_35 QH143_96 QH144_11 QH144_12 QH144_21 QH144_22 QH144_23 QH144_24 QH144_25 QH144_26 QH144_31 QH144_32 QH144_33 QH144_34 QH144_36 QH144_37 QH144_96 HOUSE memsleep QH118A_1 QH118A_2 QH118A_3 QH118B_1 QH118B_2 QH118B_3 QH118C_1 QH118C_2 QH118C_3 QH118D_1 QH118D_2 QH118D_3 QH118E_1 QH118E_2 QH118E_3 QH118F_1 QH118F_2 QH118F_3 by ncombsco nurbscor nrurscor /cells mean count stddev. graph /histogram(normal)=combscor /title= 'Distribution of Households by Wealth Scores'. frequencies variables=combscor /format=notable /ntiles=5 /statistics=stddev minimum maximum semean mean median mode skewness seskew kurtosis sekurt /order=analysis. weight off. filter off. write formats combscor urbscore rurscore (f11.5). * Save final dataset of assets. save outfile='assets.sav'. *** Write out scores file. write outfile='scores.dat' table /QHCLUST QHNUMBER combscor ncombsco urbscore nurbscor rurscore nrurscor. execute.